import { createRouter, createWebHashHistory } from 'vue-router';
import Login from './components/Login.vue'; // 确保路径正确
import Home from './components/Home.vue'; // 确保你有这个组件

const routes = [
    { path: '/', redirect: '/login' },
    { path: '/login', component: Login },
    { path: '/home', component: Home }, // 确保这个路由存在
];

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

export default router;
